/**
 * Created by IntelliJ IDEA
 *
 * @author zhengjie
 * @Date:2022/1/8 17:12
 * @Version 1.0
 */
package com.zj.ssm.conver;

import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import com.zj.ssm.pojo.domain.Branch;

public class BranchConverter implements Converter<Branch> {
    @Override
    public Class supportJavaTypeKey() {
        return Branch.class;
    }

    @Override
    public CellDataTypeEnum supportExcelTypeKey() {
        return CellDataTypeEnum.STRING;
    }

    @Override
    public Branch convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
        return null;
    }

    @Override
    public CellData convertToExcelData(Branch branchDO, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
        return new CellData( branchDO.getBname()   );
    }
}
